<?php
/**
 * Created by PhpStorm.
 * Author: 芸签cms www.yunqiancms.com
 * User: sun
 * Date: 2022/7/1
 * Time: 8:37 AM
 */
namespace app\backend\modules\content\services;
use app\common\models\Tag;

class TagService
{
    /**
     * 获取分类列表
     * @param $params
     * @return mixed
     */
    public function getList($params){
        $query = Tag::site()->select();
        if($params['name']){
            $query->where('name','like','%'.$params['name'].'%');
        }
        $list = $query
            ->orderBy('id', 'desc')
            ->paginate(10);
        return $list;
    }
}